<?php
require_once dirname(__FILE__) . '/common/common.inc.php';
require_once dirname(__FILE__) . "/database/$database/database.inc.php";

header('Content-Type: text/plain');

global $myManager;
try {
  $myManager->start_t();
  classToOrm('pz_user')->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
  classToOrm('pz_client')->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
  classToOrm('pz_visa')->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
  classToOrm('pz_school')->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
  classToOrm('pz_template')->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
  classToOrm('pz_file')->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
  classToOrm('pz_system')->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
  $myManager->commit_t();
  echo json_encode(array());
} catch (PDOException $e) {
  echo ERROR_SIGN . $e->getMessage();
}
?>